this._updateAlwaysZoom();
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateAlwaysZoom));
- global.screen.connect('notify::n-workspaces',
- Lang.bind(this, this._workspacesChanged));
Main.xdndHandler.connect('drag-begin', Lang.bind(this, function(){
this._alwaysZoomOut = true;
this._switchWorkspaceNotifyId = 0;
+ this._nWorkspacesChangedId = 0;
this._itemDragBeginId = 0;
this._itemDragCancelledId = 0;
this._itemDragEndId = 0;
this._windowDragEndId = 0;
},
- show: function() {
+ show: function() {
this._zoomOut = this._alwaysZoomOut;
this._zoomFraction = this._alwaysZoomOut ? 1 : 0;
this._updateZoom();
global.screen.connect('restacked',
Lang.bind(this, this._onRestacked));
+ if (this._nWorkspacesChangedId == 0)
+ this._nWorkspacesChangedId = global.screen.connect('notify::n-workspaces',
+ Lang.bind(this, this._workspacesChanged));
if (this._itemDragBeginId == 0)
this._itemDragBeginId = Main.overview.connect('item-drag-begin',
Lang.bind(this, this._dragBegin));